home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: netcom.com!rbarris
- From: rbarris@netcom.com (Robert Barris)
- Subject: [STL] Safety of STL in a co-operative thread world?
- Message-ID: <rbarrisDn5J01.Ltz@netcom.com>
- Organization: NETCOM On-line Communication Services (408 261-4700 guest)
- Date: Thu, 22 Feb 1996 00:36:00 GMT
- Sender: rbarris@netcom11.netcom.com
-
-
- I have read some comments to the effect of
-
- "STL is not thread safe."
-
- due to its use of static globals etc etc (which I have not checked out
- for myslef, I took those comments at face value).
-
- My question:
-
- In a "co-operative" thread environment, such as that provided by several
- third party DOS/Win3 libraries, or MacOS 7.5's Thread Manager whereby
- thread switching only takes place in response to explicit "yield"
- statements, is it likely that STL will work OK? That is to say, in the
- absence of thread pre-emption.
-
- Assume that yielding is not allowed inside any single STL primitive (ie,
- no changes to the STL source). Further assume that threads explicitly
- avoid operating on the same containers in overlapping time frames (I do
- not expect STL to magically turn into a re-entrant multiuser database)...
-
- I might be able to understand the situation better if I knew exactly what
- the alleged static globals were, and what their purposes are.
-
- Rob Barris
- Quicksilver Software Inc.
- rbarris@quicksilver.com / http://www.quicksilver.com/~rbarris/
- * Opinions expressed not necessarily those of my employer *
-
-
-